From: Jasper St. Pierre Date: Wed, 11 Sep 2013 18:20:39 +0000 (-0400) Subject: overview: Send the clone with the window-drag events X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~3129 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=e4c07875a3dc6f4beef45832e3f727141d4e8b06;p=gnome-shell.git overview: Send the clone with the window-drag events This allows clients that care about the actual item we're dragging to make smarter decisions without adding a drag monitor themselves. --- diff --git a/js/ui/overview.js b/js/ui/overview.js index 088532adc..fedfea0b9 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -443,17 +443,17 @@ const Overview = new Lang.Class({ this._inDrag = false; }, - beginWindowDrag: function(source) { - this.emit('window-drag-begin'); + beginWindowDrag: function(clone) { + this.emit('window-drag-begin', clone); this._inDrag = true; }, - cancelledWindowDrag: function(source) { - this.emit('window-drag-cancelled'); + cancelledWindowDrag: function(clone) { + this.emit('window-drag-cancelled', clone); }, - endWindowDrag: function(source) { - this.emit('window-drag-end'); + endWindowDrag: function(clone) { + this.emit('window-drag-end', clone); this._inDrag = false; }, diff --git a/js/ui/workspace.js b/js/ui/workspace.js index ee3b636f5..57a7de418 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -1468,17 +1468,17 @@ const Workspace = new Lang.Class({ clone.connect('selected', Lang.bind(this, this._onCloneSelected)); clone.connect('drag-begin', - Lang.bind(this, function(clone) { - Main.overview.beginWindowDrag(); + Lang.bind(this, function() { + Main.overview.beginWindowDrag(clone); overlay.hide(); })); clone.connect('drag-cancelled', - Lang.bind(this, function(clone) { - Main.overview.cancelledWindowDrag(); + Lang.bind(this, function() { + Main.overview.cancelledWindowDrag(clone); })); clone.connect('drag-end', - Lang.bind(this, function(clone) { - Main.overview.endWindowDrag(); + Lang.bind(this, function() { + Main.overview.endWindowDrag(clone); overlay.show(); })); clone.connect('size-changed', diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index 9dbc1afda..237998376 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -438,16 +438,16 @@ const WorkspaceThumbnail = new Lang.Class({ this.activate(time); })); clone.connect('drag-begin', - Lang.bind(this, function(clone) { - Main.overview.beginWindowDrag(); + Lang.bind(this, function() { + Main.overview.beginWindowDrag(clone); })); clone.connect('drag-cancelled', - Lang.bind(this, function(clone) { - Main.overview.cancelledWindowDrag(); + Lang.bind(this, function() { + Main.overview.cancelledWindowDrag(clone); })); clone.connect('drag-end', - Lang.bind(this, function(clone) { - Main.overview.endWindowDrag(); + Lang.bind(this, function() { + Main.overview.endWindowDrag(clone); })); this._contents.add_actor(clone.actor);